1. Field of the Invention
This invention relates generally to onboard vehicle camera systems and, more particularly, to a method and system for calibrating the aiming direction of a forward-looking camera on a vehicle that uses a Global Positioning System-based calculation of solar position relative to the vehicle and a camera-based determination of solar position relative to the vehicle as input, and performs an ongoing recursive calculation using a Kalman filtering algorithm to determine the azimuth and pitch angles of misalignment between the camera's aiming direction and the vehicle's true straight-ahead direction.
2. Discussion of the Related Art
Most vehicles are equipped with a sun visor that can be selectively flipped down from a stored position if the vehicle is traveling into a low sun angle, so that the driver is not staring directly into the sun. The sun visor is typically able to block the sun shining through the windshield, as well as through the windows. The sun visor makes the driving experience more pleasant, and also has an obvious safety value.
Systems have been developed in the art to automatically adjust the position of a sun blocker in response to a sun incident angle. For example, U.S. Pat. No. 6,811,201, titled, Automatic Sun Visor and Solar Shade System for Vehicles, issued Nov. 2, 2004 to Naik, discloses an automatic sun visor system for a vehicle that includes a light detecting apparatus for detecting sunlight incident on the face of a driver of the vehicle, and adjusts the sun visor in response to the detected sunlight on the face of the driver.
However, many of the automatic sun visor controllers available on the market require the use of expensive cameras, sensors, or other hardware dedicated to the purpose of controlling the sun visor. This discourages the use of those systems in moderately priced vehicles. A need exists for a lower cost sun visor control system, which takes advantage of commonly-available sensors and systems on a vehicle and uses them to determine the optimum position of the sun visor.
Modern vehicles sometimes include one or more cameras that provide back-up assistance, take images of the vehicle driver for determining driver drowsiness or attentiveness, provide images of the road as the vehicle is traveling for collision avoidance purposes, provide structure recognition, such as roadway signs, etc. For those applications where the camera image is analyzed for purposes such as safety warnings, it is critical to accurately calibrate the position and orientation of the camera with respect to the vehicle. Because of manufacturing tolerances, a separate end-of-line camera calibration, or aftermarket camera adjustment, must be performed on each vehicle for such things as accurate overlay of predicted vehicle path lines.
Some known camera systems do not provide camera calibration, but revert to a default value that may provide a couple of degrees of error. Other camera systems provide a pre-calibration approach where points on the camera image are hand-labeled and feature point locations are hand-measured in the vehicle coordinates, such as by providing a checker board pattern of the image. However, these calibration techniques are typically time consuming and must be performed at a service location. Therefore, if the vehicle is traveling and hits a bump or some other obstacle in the road, the camera position could be altered, and the calibration would not be accurate until the vehicle was taken to the service location to be corrected.
Camera calibration involves determining a set of parameters that relate camera image coordinates to world coordinates and vice versa. Some camera parameters, such as camera focal length, optical center, etc., are stable, while other parameters, such as camera orientation and position, are not. And even a small change in camera yaw or pitch angle relative to the vehicle can have a large influence on a system such as a lane departure warning. Therefore, what is needed is a camera calibration process that automatically calibrates camera orientation parameters as the vehicle is being driven where the vehicle-camera system continually adapts itself over time.